import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class outputStream_Test {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\Test\\outputStream.txt");
        FileOutputStream fileOutputStream = new FileOutputStream(file);

        fileOutputStream.write(97);
        fileOutputStream.write(98);
        fileOutputStream.write(99);
        fileOutputStream.write(13);
        fileOutputStream.write(10);
        fileOutputStream.write(-26);
        fileOutputStream.write(-120);
        fileOutputStream.write(-111);


        //刷新缓冲区
        fileOutputStream.flush();
        //关闭流
        fileOutputStream.close();

    }
}
